package com.cbw.bean;

import java.sql.Timestamp;
import java.util.Date;
import java.util.Objects;

public class Courier {
    private int id;
    private String number;
    private String username;
    private String phone;
    private String cardId;
    private String password;
    private int sendNumber;//派件数
    private Date createTime;//注册时间
    private Date lasTime;//上次登录时间

    public Courier() {
    }

    public Courier(int id, String number, String username, String phone, String cardId, String password, int sendNumber, Date createTime, Date lasTime) {
        this.id = id;
        this.number = number;
        this.username = username;
        this.phone = phone;
        this.cardId = cardId;
        this.password = password;
        this.sendNumber = sendNumber;
        this.createTime = createTime;
        this.lasTime = lasTime;
    }

    public Courier( String username, String phone, String cardId, String password, int sendNumber, Date createTime) {

        this.username = username;
        this.phone = phone;
        this.cardId = cardId;
        this.password = password;
        this.sendNumber = sendNumber;
        this.createTime = createTime;

    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Courier courier = (Courier) o;
        return id == courier.id && sendNumber == courier.sendNumber && Objects.equals(number, courier.number) && Objects.equals(username, courier.username) && Objects.equals(phone, courier.phone) && Objects.equals(cardId, courier.cardId) && Objects.equals(password, courier.password) && Objects.equals(createTime, courier.createTime) && Objects.equals(lasTime, courier.lasTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, number, username, phone, cardId, password, sendNumber, createTime, lasTime);
    }

    @Override
    public String toString() {
        return "Courier{" +
                "id=" + id +
                ", number='" + number + '\'' +
                ", username='" + username + '\'' +
                ", phone='" + phone + '\'' +
                ", cardId='" + cardId + '\'' +
                ", password='" + password + '\'' +
                ", sendNumber=" + sendNumber +
                ", createTime=" + createTime +
                ", lasTime=" + lasTime +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getSendNumber() {
        return sendNumber;
    }

    public void setSendNumber(int sendNumber) {
        this.sendNumber = sendNumber;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getLasTime() {
        return lasTime;
    }

    public void setLasTime(Date lasTime) {
        this.lasTime = lasTime;
    }
}
